<template>
  <view class="modal-mask">
    <view class="modal-content">
      <view class="modal-header">
        <text>用户详情</text>
        <button @click="$emit('close')">关闭</button>
      </view>
      <view class="modal-body">
        <image :src="user.avatar" class="avatar" />
        <view>昵称：{{ user.nickname }}</view>
        <view>学号/工号：{{ user.code }}</view>
        <view>注册时间：{{ user.registerTime }}</view>
        <view>信用分：{{ user.credit }}</view>
        <view>累计任务数：{{ user.taskCount }}</view>
        <view>状态：{{ user.status }}</view>
        <!-- 可扩展更多详细信息 -->
      </view>
    </view>
  </view>
</template>

<script>
export default {
  props: {
    user: Object
  }
}
</script>

<style lang="scss">
.modal-mask {
  position: fixed; left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.3);
  display: flex; align-items: center; justify-content: center;
  z-index: 999;
}
.modal-content {
  background: #fff; border-radius: 8rpx; padding: 40rpx; min-width: 400rpx;
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20rpx;
}
.avatar {
  width: 100rpx; height: 100rpx; border-radius: 50%; margin-bottom: 20rpx;
}
</style>